package com.wang.users.pojo;

import java.util.Date;
import java.util.Map;
import java.util.TreeMap;

import com.wang.common.pojo.BasePojo;

/**
 * 体侧历史表
 * 
 * @author MyJjh
 *
 */
public class ABodyside extends BasePojo<ABodyside>
{

	private int id;
	private int usersId;
	private int standId;
	private int vitalcapacity;
	private double longrun;
	private double shortrun;
	private double height;
	private double weight;
	private double bml;
	private int abdominalcurl;
	private int sittingforward;
	private double healthIndex;

	private double vitalcapacityFraction;
	private double longrunFraction;
	private double shortrunFraction;
	private double bmlFraction;
	private double abdominalcurlFraction;
	private double sittingforwardFraction;

	private byte status;

	private Date createTime;
	private Date updateTime;
	private Date pubTime;

	private String statusStr;

	/* 关联关系 */
	private AUsers users;
	private ABodyStand stand;

	private Map<String, String> enumsMap = new TreeMap<String, String>();

	public Map<String, String> getEnumsMap()
	{
		// 根据状态值获取字符串描述
		ABodysideEnum[] sideEnums = ABodysideEnum.values();
		for (int i = 0; i < sideEnums.length; i++)
		{
			ABodysideEnum sideEnum = sideEnums[i];
			String key = sideEnum.toString();
			enumsMap.put(key + "-" + sideEnum.getStatus() + "", sideEnum.getName());
		}
		return enumsMap;
	}

	public String getStatusStr()
	{
		ABodysideEnum[] values = ABodysideEnum.values();
		for (int i = 0; i < values.length; i++)
		{
			ABodysideEnum sideEnum = values[i];
			if (sideEnum.toString().startsWith("STATUS"))
			{
				if (sideEnum.getStatus() == this.status)
				{
					this.statusStr = sideEnum.getName();
				}
			}
		}

		return statusStr;
	}

	public AUsers getUsers()
	{
		return users;
	}

	public void setUsers(AUsers users)
	{
		this.users = users;
	}

	public ABodyStand getStand()
	{
		return stand;
	}

	public void setStand(ABodyStand stand)
	{
		this.stand = stand;
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public int getUsersId()
	{
		return usersId;
	}

	public void setUsersId(int usersId)
	{
		this.usersId = usersId;
	}

	public int getStandId()
	{
		return standId;
	}

	public void setStandId(int standId)
	{
		this.standId = standId;
	}

	public int getVitalcapacity()
	{
		return vitalcapacity;
	}

	public void setVitalcapacity(int vitalcapacity)
	{
		this.vitalcapacity = vitalcapacity;
	}

	public double getLongrun()
	{
		return longrun;
	}

	public void setLongrun(double longrun)
	{
		this.longrun = longrun;
	}

	public double getShortrun()
	{
		return shortrun;
	}

	public void setShortrun(double shortrun)
	{
		this.shortrun = shortrun;
	}

	public double getHeight()
	{
		return height;
	}

	public void setHeight(double height)
	{
		this.height = height;
	}

	public double getWeight()
	{
		return weight;
	}

	public void setWeight(double weight)
	{
		this.weight = weight;
	}

	public double getBml()
	{
		return bml;
	}

	public void setBml(double bml)
	{
		this.bml = bml;
	}

	public int getAbdominalcurl()
	{
		return abdominalcurl;
	}

	public void setAbdominalcurl(int abdominalcurl)
	{
		this.abdominalcurl = abdominalcurl;
	}

	public int getSittingforward()
	{
		return sittingforward;
	}

	public void setSittingforward(int sittingforward)
	{
		this.sittingforward = sittingforward;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	public double getHealthIndex()
	{
		return healthIndex;
	}

	public void setHealthIndex(double healthIndex)
	{
		this.healthIndex = healthIndex;
	}

	public double getVitalcapacityFraction()
	{
		return vitalcapacityFraction;
	}

	public void setVitalcapacityFraction(double vitalcapacityFraction)
	{
		this.vitalcapacityFraction = vitalcapacityFraction;
	}

	public double getLongrunFraction()
	{
		return longrunFraction;
	}

	public void setLongrunFraction(double longrunFraction)
	{
		this.longrunFraction = longrunFraction;
	}

	public double getShortrunFraction()
	{
		return shortrunFraction;
	}

	public void setShortrunFraction(double shortrunFraction)
	{
		this.shortrunFraction = shortrunFraction;
	}

	public double getBmlFraction()
	{
		return bmlFraction;
	}

	public void setBmlFraction(double bmlFraction)
	{
		this.bmlFraction = bmlFraction;
	}

	public double getAbdominalcurlFraction()
	{
		return abdominalcurlFraction;
	}

	public void setAbdominalcurlFraction(double abdominalcurlFraction)
	{
		this.abdominalcurlFraction = abdominalcurlFraction;
	}

	public double getSittingforwardFraction()
	{
		return sittingforwardFraction;
	}

	public void setSittingforwardFraction(double sittingforwardFraction)
	{
		this.sittingforwardFraction = sittingforwardFraction;
	}

}
